#include <stdint.h>
#include <stdio.h>

#include "jl_error.h"
#include "jl_types.h"
#include "jl_config.h"
#include "portable/jl_portable.h"
#include "driver/hal_smi.h"

#include "stm32f4x7_eth.h"

struct smi_device_s g_smi_dev;


jl_uint16 jl_smi_read(jl_uint8 phy, jl_uint8 reg)
{
	jl_uint16 val;
	val = ETH_ReadPHYRegister(phy, reg);
	return val;
}

void jl_smi_write(jl_uint8 phy, jl_uint8 reg, jl_uint16 val)
{
	ETH_WritePHYRegister(phy,reg,val);
}

jl_api_ret_t jl_smi_init(void)
{
	return JL_ERR_OK;
}

jl_api_ret_t jl_smi_deinit(void)
{
	return JL_ERR_OK;
}
